#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

//二元谓词
class mycompare 
{
public: 
	bool operator()(int val1, int val2)       
	{
		return val1 > val2;
	}
};

void test01()
{
	vector<int> v;
	v.push_back(10);
	v.push_back(30);
	v.push_back(60);
	v.push_back(20);
	v.push_back(8);

	sort(v.begin(), v.end(), mycompare());
	for (auto it : v)
	{
		cout << it << " ";
	}
	cout << endl;
}
int main()
{
	test01();
	return 0;
	system("pause");
}